// 引入request
import request from '../util/request.js';

const OrderRequireRequest = {
    BASE_URL : "http://localhost:8085/pro",
    // 请求过程在这里开发，不在.vue文件中开发
    /**
     * 分页查询产品物料的API
     * @param orderRequest
     * @param callBack
     */
    loadOrderRequire(orderRequest, callBack){
        // 拼接url  /sys/queryByPage?xxx
        console.dir(orderRequest)
        let url = this.BASE_URL + "/require/queryByPage";
        //let url = this.BASE_URL + "/orderRequest/queryByPage";  调用request进行请求  http://lcation
        request.get(url,orderRequest,callBack);
    },

    /**
     * 根据id查询步骤的API
     * @param woId
     * @param callBack
     */
    getById(woId,callBack){
        request.get(this.BASE_URL + "/require/queryById?woId=" + woId,null,callBack);

    },
    getByRequireId(requireId,callBack){
        console.log("requireId")
        console.log(requireId)
        request.get(this.BASE_URL + "/require/queryByRequireId?requireId=" + requireId,null,callBack);
    },

}
export default OrderRequireRequest;